#ifndef _VERTEX_DATA_WRAPPER_H
#define _VERTEX_DATA_WRAPPER_H

namespace Graphics
{
	struct VertexDataWrapper
	{
		unsigned int nrOfVertices;
		unsigned int stride;
		unsigned int size;
		DWORD fvf;
		D3DPRIMITIVETYPE primitiveType;
		char* vertexData;

		template <class VertexType>
		void Init(Utils::GrowingArray<VertexType>& aVertexData, DWORD aFvf, D3DPRIMITIVETYPE aPrimitiveType)
		{
			nrOfVertices = aVertexData.Count();
			stride = sizeof(VertexType);
			size = nrOfVertices * stride;
			fvf = aFvf;
			primitiveType = aPrimitiveType;
			vertexData = new char[size];
			memcpy(vertexData, &aVertexData[0], size);
		}
	};
}

#endif